package com.atao.baokede.service.serviceImpl;

import com.atao.baokede.mapper.DistrictMapper;
import com.atao.baokede.pojo.District;
import com.atao.baokede.service.DistrictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class DistrictServiceImpl implements DistrictService {

    @Autowired
    private DistrictMapper districtMapper;


    @Override
    public List<String> getAllProvinces() {
        return districtMapper.getAllProvinces();
    }

    @Override
    public List<String> getCitiesByProvinceName(String provinceName) {
        return districtMapper.getCitiesByProvinceName(provinceName);
    }

    @Override
    public List<String> getDistrictsByProvinceAndCityName(String provinceName, String cityName) {
        return districtMapper.getDistrictsByProvinceAndCityName(provinceName, cityName);
    }
}